<template>
<div style="padding: 20px">
  <ul>
    <li v-for="item of list">
      <h4>{{item.agencyName}}</h4>
      <h6><van-icon name="location-o" /> {{item.addr}}</h6>
      <h6>
        <van-icon name="phone-o" />
        <a :href="`tel:${item.telephone}`">{{item.telephone}}</a>
      </h6>
      <bdmap :location='item.addr' :pid='`bd${item.id}`' />
    </li>
  </ul>
</div>
</template>

<script>
import { agencyInfo } from "@/api";
import bdmap from "@/components/bdmap";
export default {
  name: "callme",
  components:{
    bdmap
  },
  data() {
    return {
      list:[]
    }
  },
  created() {
    this.getList()
  },
  methods: {
    getList(){
      agencyInfo().then(res=>{
        console.log(res)
        this.list = res.records
      })
    }
  }
}
</script>

<style scoped>

</style>
